#define DEBUG
#include <cstdio>
#include <cstdlib>
#include <ctime>

using namespace std;

void makeData(int n) {
	FILE *f = fopen("password.in", "w");
	for (int i=1; i<=n; i++) {
		putc(rand()%5+'a', f);
	}
	putc('\n', f);
	for (int i=1; i<=n; i++) {
		putc(rand()%3+'a', f);
	}

	fclose(f);
}

int main() {
	srand(time(0));

	int t, n;
	scanf("%d %d", &t, &n);
	for (int i=1; i<=t; i++) {
		makeData(n);	
		system("./src");
		system("./checker");
		if (system("cmp password.out password.checker.out")) {
			printf("WA\n");
			return -1;
		}
	}
	
	return 0;
}
